package com.molichuxing.services.infrastructure.dao;

import com.molichuxing.services.infrastructure.bean.AccountGroupBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface AccountGroupMapper {
    /**
     *
     * @mbg.generated
     */
    int insert(AccountGroupBean record);

    /**
     *
     * @mbg.generated
     */
    int insertSelective(AccountGroupBean record);

    /**
     *
     * @mbg.generated
     */
    AccountGroupBean selectByPrimaryKey(Integer id);

    /**
     *
     * @mbg.generated
     */
    int updateByPrimaryKeySelective(AccountGroupBean record);

    /**
     *
     * @mbg.generated
     */
    int updateByPrimaryKey(AccountGroupBean record);

    /**
     * 查询符合条件的关联数据
     * @param param
     * @return
     */
    List<AccountGroupBean> getAccountGroupListByParam(@Param("param") Map<String, Object> param);

    /**
     * 批量插入数据到数据库
     * @param bean
     */
    int createAccountGroup(AccountGroupBean bean);

    /**
     * 根据条件删除相应的数据
     * @param param
     * @return
     */
    int deleteByParam(@Param("param") Map<String, Object> param);

    /**
     * 通过账号id删除关联表数据
     * @param accountId
     * @return
     */
    int deleteByAccountId(@Param("accountId") int accountId);
}